package com.ids.transfer.util;

import com.ids.transfer.config.ItemConfig;

/**
 * this class is made of writing the common
 *  function which used in extra-data
 **/
public class ExtraUtils {
	public ExtraUtils() {
	}

	/**
	 * 
	 * @param iccs ImpClassConfig[]数组
	 * @param classname xml的类名
	 * @return
	 */
	public static ItemConfig getImpClass(ItemConfig[] iccs,
			String classname) {
		for (int i = 0; i < iccs.length; i++) {
			ItemConfig icc = iccs[i];
			String tmp = icc.getType();
			//com.ids.transfer.GenItem
			int k = tmp.lastIndexOf(".");
			String tmp1 = tmp.substring(k + 1, tmp.length());
			//genItem
			if (tmp1.equals(StrCharUtil.toUpperFirst(classname)))
				return icc;
		}
		return null;
	}

	public static void main(String[] args) {
	}
}